//封装所有和用户相关的接口函数
import request from "@/utils/http";


// 用户登录接口
export function loginAPI(loginFormDTO) {
    return request({
        url: '/users/login',
        method: 'post',
        data: loginFormDTO
    });
}

//用户注册接口
export function registerAPI(registerFormDTO) {
    console.log(registerFormDTO)
    return request({
        url: '/users/register',
        method: 'post',
        data: registerFormDTO
    });
}


// 扣减余额接口
export function deductMoneyAPI(pw, amount) {
    return request({
        url: '/users/money/deduct',
        method: 'put',
        params: {
            pw,
            amount
        }
    });
}

